package ids.dev.model;

import ids.dev.util.IDSStringUtil;

import java.io.Serializable;
import java.util.Calendar;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

@Entity
@Table(name = "ids_event")
public class Event implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="id")
	@SequenceGenerator(allocationSize=1, initialValue=1, sequenceName="event_id_seq", name="event_id_seq")
	@GeneratedValue(generator="event_id_seq", strategy=GenerationType.SEQUENCE)
	private Integer id;
	
	private String name = IDSStringUtil.STRING_EMPTY;
	
	@Column(name="start_date")
	@Temporal(TemporalType.TIMESTAMP)
	private Calendar startDate;
	
	@Column(name = "end_date")
	@Temporal(TemporalType.TIMESTAMP)
	private Calendar endDate;
	
	@Transient
	private Group group;
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}



	
	
}
